package com.zl.integraterocketmq.consumer;

import com.zl.integraterocketmq.entity.OrderPaidEvent;
import lombok.extern.slf4j.Slf4j;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Service;

/**
 * @Author: Why
 * @Date: 2022-01-03
 */
@Slf4j
@Service
@RocketMQMessageListener(topic = "object-topic", consumerGroup = "my-consumer_object-topic")
public class SyncGeneralMQConsumer2 implements RocketMQListener<OrderPaidEvent> {

    @Override
    public void onMessage(OrderPaidEvent message) {
        log.info("SyncGeneralMQConsumer2 消费端接收到消息:{}", message.toString());
    }
}
